home *** CD-ROM | disk | FTP | other *** search
- !Help for !CoreWar Version 7.01
- -------------------------------
-
- *** Compliant to the May 1986 International ***
- *** Core Wars Society specification ***
-
- [Docs as of 7-Apr-91]
-
- Files included in this package :-
-
- !Run
- !RunImage
- !Sprites
- Sprites
- !Help
- Templates
- code
- ArmCode
- chkspr ) my chkspr util, rename the app and see what
- !Boot ) happens (nothing!). Notes in Comments.
-
- and a directory 'Source' with lots of files!
-
- The Core War is a game originally devised by A.K. Dewdney
- and published in the 'Computer Recreations' column of the
- May 1984 Scientific American. This application provides a
- multi-tasking version of the game along with an intergrated
- stand alone version that runs somewhat quicker!
-
-
- Usage
- -----
-
- For instructions on how to play the game I advise you to
- get a copy of the BBC Acorn User May 1991 editon, which
- gives a gentle tutorial into the corewar (I would include
- it verbatim, but it is their copyright now!) however if you
- can't/don't get a copy the appendix provides some
- introductory notes.
-
- You should be able to use the actual application without
- any documentation, so long as you know redcode!, since I
- have tried to make the user interface completely common
- sense - well it is to me anyway, all the same ...
-
- To commence a battle simply drop two battle programs onto
- the corewar iconbar sprite. A battle program can either be
- a text file with 'redcode' source or an object code file
- with filetype 'data' or 'corewar'. The advantage of the
- object code is that there is no time wait for assembly
- (even though the machine multi-tasks during assembly which
- is normally less that thirty seconds), you can double click
- (corewar files) to load them and more importantly you can
- post your programs to your friends in a form that is much
- harder for them to crack and copy your ideas! (for an
- appropriate sum I can provide you with my dissasembler
- ...). I suggest you create a directory 'Object' and place
- all the object code versions of you programs in there,
- otherwise it can be all to easy to overwrite your source -
- not such a good idea!.
-
- Once two battle programs have been dropped on the iconbar
- sprite then clicking on 'Commence Battle' will do just
- that! A battle screen opens with the names of the opponents
- in their appropriate colours and assosiated number of tasks
- running. You can run the Core War as a full screen version
- (reeping the signifcant speed benefits) by choosing the
- 'Single Task' option in the iconbar menu. <Escape> will
- return to the desktop and the Core War will continue
- playing in a window.
-
- Clicking on the quit icon on the battle screen removes it
- from sight and significantly increases the speed of the
- simulation (in mode 12 this can approach the stand alone
- speed when maximum speed is selected), clicking on the
- iconbar sprite will reopen the battle screen.
-
- Hopefully the appearance and dissapearance of the dialogues
- and windows should be fairly intuative (ie Adjust clicks
- work) - if you don't think so then tell me and I will fix
- it!
-
- Menu Choices
- ------------
-
-
- Info : As per usual!
-
- Pause/ : Pauses the game } one or the other displayed
- Continue Continues the game } at any one time!
-
- Stop : The battle is teminated, can NOT be continued.
- This option returns any surplus memory to the
- system.
-
- Show Screen : Opens the battle screen.
-
- Cycles : Sets the number of locations executed before
- returning to the WIMP.
- min is 1,max is 150 and < 15 is very responsive.
-
- Single Task : If ticked then the full screen 625 cps
- version of the CoreWar will be used. All
- tasks are suspended during the battle.
- If chosen while a battle is in progress then
- the application will go into full screen
- mode. As normal <Escape> returns to the desktop.
-
- Save Code : If ticked a save window will pop up instead
- allowing saving of the assembled code.
-
- Quit : You've guessed it!
-
-
- System Variables
- ----------------
-
- There are a few features of the application that you can
- configure with system variables, if you input stupid
- things/nothing the the application will adopt the indicated
- defaults (they are pretty good starting points) :-
-
- CoreWar$Cycles XXX : This sets the default parameter
- 'cycles' as in the menu. Default
- is 10.
-
- CoreWar$SaveAssembly y/n : This sets the 'Save Code'
- option. Default is n.
-
- CoreWar$SingleTask y/n : This sets the 'Single Task'
- option. Default is n.
-
-
- Appendix
- --------
-
- A VERY Rudimentary Introduction to the Core War
- -----------------------------------------------
-
- The 'Core War' is a game played within a simulated
- computer using a language called 'Redcode' which is much
- like the 6502 assembly language of the BBC micro. Two
- programs are placed randomly in the memory array (which is
- accessed through a modulo statement so if a location is
- required that is bigger than the array size then the
- address 'wraps' around) and then left to run, being
- supervised by the executive program which simulates a
- multi-tasking operating system. The idea of the game is to
- 'kill' the other program by making it execute a
- non-executable instruction!
-
- The simplest RedCode program is Imp, MOV 0 1. It copies
- itself one location forward, the very location to next be
- executed. Hence Imp trails all the way through the core one
- loaction at a time.
-
- The following programs are examples of the Redcode
- assembly language that the !CoreWar application uses (the
- command set is included below). The '.' followed by a
- number is a label much like Basic assembler labels but only
- numbers are allowed. This program is called Dwarf.
-
- JMP .0
- .1 DAT -1
- .0 MOV .1 @.1
- ADD # 5 .1
- JMP .0
-
- The program simply pokes the number 0 in every fifth
- location in the memory array. The 'JMP .0' skips the
- non-executable data statement at '.1'. 'MOV .1 @.1' puts
- 'DAT x' in the memory location pointed to by the value
- stored at x (where x is the data stored in the DAT
- location). 'ADD #5 .1' increments the data stored at .1 by
- 5 and 'JMP .0' returns the PC to the beginning of the loop.
-
- A more interesting example is a self-copying program.
- This example copies itself 100 locations forward and then
- executes from there. It is called Gemini.
-
- JMP .2
- .0 DAT 5
- .2 MOV #5 .0
- MOV #100 .1
- .3 MOV @.0 <.1
- DJN .3 .0
- JMP @.1
- .1 DAT 100
-
- The only new feature in this code is the use of the
- auto-decrement indirect addessing mode, '<'. With this
- addressing mode the location specified is decremented and
- then treated as if it had been specified with a '@'. The
- entire reason for this mode is to speed up coping of code
- to encouage interesting programs.
-
- That assembler allows up to 40 lables and about 250
- generated lines of object code. The assembler is not case
- sensitive and comments are added by using the \ character.
-
-
- Table of valid redcode menonics :-
-
- Mnemonic Args Function
- +-------------------------------------------------------------+
- | | | |
- | DAT | - B | B is a data value. Non executable |
- | | | |
- | MOV | A B | Copy the contents of A to the |
- | | | contents of B |
- | | | |
- | ADD | A B | Add the contents of A to the |
- | | | contents of B |
- | | | |
- | SUB | A B | Subtract the contents of A from |
- | | | the contents of B |
- | | | |
- | JMP | A - | Jump to statement at A |
- | | | |
- | JMZ | A B | If the contents of B is zero, jump |
- | | | to A |
- | | | |
- | JMN | A B | If the contents of B is not zero, |
- | | | jump to A |
- | | | |
- | DJN | A B | Decrement the contents of B. If |
- | | | the contents of B is not zero, |
- | | | jump to A |
- | | | |
- | CMP | A B | Compare the contents of A with |
- | | | the contents of B. If they are |
- | | | equal skip the next instruction |
- | | | |
- | SPL | A - | Spilt the exection to the next |
- | | | statement and the one at A |
- | | | |
- +-------------------------------------------------------------+
-
- and addresssing modes :-
-
- Type Prefix Definition
- +-------------------------------------------------------------+
- | | | |
- |Immediate| # | Val specified used |
- | | | |
- |Relative | none | Val specified acts relative to PC |
- | | | |
- |Indirect | @ | Val specified points relatively to the |
- | | | val to be used (acting relative to its |
- | | | loc in mem, not the P.C.'s) |
- | | | |
- |Auto- | | As indirect by the location is decremented |
- |Decrement| < | by one before calculating the resultant |
- |Indirect | | location |
- | | | |
- +-------------------------------------------------------------+
-
-
- For those in the know the core size is 8000 locations -
- this is hardwired into the code for speed - sorry - if you
- want something different please get in contact with me & I
- will provide you with another 'ArmCode' file.
-
-
- Versions
- --------
-
- 1.xx : The inital BBC versions (no graphics!)
- 2.xx : The BBC teletext graphics versions (BAU published
- one of these!)
- 3.xx : The inital Master 128 versions
- 4.xx : The inital Archimedes versions
- 5.xx : The corewar converted to 'C'
- 6.xx : The ARM code versions of the CoreWar
-
- and after all that - and a good three years - we have the
- one and only brand spanking new, heavily re-coded ...
-
- 7.00 : The first release of the multi-tasking version.
- Fully featured with a built in assembler, stand
- alone battle version and, I would guess the world's
- first, multi-tasking battle version.
-
- 7.01 : Full screen/Window toggle rather than one or the
- other. Having written 7.00 I started to develop
- some battle progs and decided that this was
- required. Also including various tidy ups, merging
- of the wimp and stand alone code and, par for the
- course, bug fixes!
-
- Comments
- --------
-
- This is my biggest application so far. The depressing
- thing is the basic version is about 3k long! (small fib
- there seeing it doesn't have an assembler and I didn't
- count the variable store but even so!). The 96k slot is
- deceptive, the program can require up to 192k but you will
- only ever notice the slot going up to 144k, the 48k
- required to store 8000 core locations of 5 bytes each. The
- extra 48k is used to convert between the full screen and
- the battle screen window since the screen needs to be saved
- as a sprite and then plotted onto the battle screen sprite
- with a scale factor (WOW, isn't RISC OS easy to use!). So
- be careful otherwise the game will refuse to do things. Oh
- yes, on assembly the game slots an extra 1.5 times the size
- of the source code.
-
-
- The ChkSpr Utility
-
- The chkspr utility will, when run, examine the '!Sprites'
- file and check if the first sprite is the application's
- name. If not that sprite's name will be changed to the
- application directory's name. The !Boot file contains
- 'Run ChkSpr', this runs the util, the next line contains
- 'IconSprites <Obey$Dir>.!Sprites' this loads the new sprite
- in. The filer always calls any new (ie renamed) app's !Boot
- file so the new sprite is automatically loaded for display.
-
- Please feel free to use the utility separately from the
- rest of the package but note that the conditions set out
- below apply to it.
-
-
- Conditions of Use
- -----------------
-
- This application is supplied free to everyone 'as is', I
- do not give any guarantee that it is free of bugs, or
- supply any warranty about its suitabliliy for use. However
- if there are any problems with it and you notify me of them
- then I probably will do my best to recify them.
-
- You may give this application to anyone, via any medium,
- so long as :-
-
- 1) It is delivered with ALL the supplied files and
- unaltered (except !Run & !Boot files).
-
- 2) It is not supplied on a disc you are charging
- for (except for media and postage costs).
-
- You have permission to use any part or the whole
- application in a project you intend to place in the public
- domain, as long as I am fully credited. If you wish to use
- any part or the whole of this application in a product that
- you wish to sell (for however much and for whatever
- reasons) or release as copyright material then my express
- permission in writing must be obtained. I maintain
- copyright on all the material supplied and reserve the
- right to amend these conditions in cases where I deem
- misuse.
-
- A large number of hours of work have gone into the
- production and maintenance of this application and although
- I have supplied the application free, donations will be
- gratefully received (and if over 7 pounds I will send you a
- disc with updates of this and all other pd stuff I have
- written. Please include a letter telling me which apps of
- mine you use and their version numbers).
-
-
- Contacts
- --------
-
- My address:
-
- 6 Parklands Place,
- Guildford,
- Surrey GU1 2PS.
-
- BBSs I call frequently:
-
- Archive BBS [0603 745932] mbx 23
- Arcade BBS [01 654 2212] mbx 23
- The World of Cryton [0749 679794] mbx 273
-
- email : maurp@uk.ac.warwick.cu
-
- (try email during term time if you want a quick reply and
- an even quicker update!)
-
- © Emmet Spier 1991 - USE and Enjoy!
-